<template>
  <view v-if="webviewUrl" style="width:100%;height:100%;overflow: hidden;box-sizing: border-box;">
    <web-view id="mywebframe" :webview-styles="webviewStyles" :src="`${webviewUrl}`" style="width:100%;height:100%;overflow: hidden;box-sizing: border-box;"></web-view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        params: {},
        webviewStyles: {
          progress: {
            color: "#FF3333"
          }
        },
		webviewUrl: "",
      }
    },
    props: {
      src: {
        type: [String],
        default: null
      }
    },
    onLoad(option) {
      this.params = option
	   console.log(this.params.url )
	    let data = JSON.parse(this.params.data)
		console.log(data)
	 this.webviewUrl = this.params.url + '?orderId=' + data.orderId+'&authorization='+data.authorization+'&userId='+data.userId+'&consultationDetailId='+data.consultationDetailId+'&uuid='+data.uuid+'&reportdevice='+data.reportdevice
	
        uni.setNavigationBarTitle({
          title:'报告预览'
        })
     
    }
  }
</script>
<style lang="scss" scoped>
	
	::v-deep body, ::v-deep html {
	            width: 100%;
	            height: 100%;
	            margin: 0;
	            padding: 0;
	        }
</style>
